-
Notifications
You must be signed in to change notification settings - Fork 70
Ensure liveQueryCollections are not ready until all it's source collections are ready #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 95df0cd The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
More templates
@tanstack/db
@tanstack/db-ivm
@tanstack/electric-db-collection
@tanstack/query-db-collection
@tanstack/react-db
@tanstack/solid-db
@tanstack/svelte-db
@tanstack/trailbase-db-collection
@tanstack/vue-db
commit: |
Size Change: +36 B (+0.06%) Total Size: 58.5 kB
ℹ️ View Unchanged
|
Size Change: 0 B Total Size: 1.05 kB ℹ️ View Unchanged
|
0f28a47
to
967f9e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM just left one nitpick.
@@ -163,6 +163,12 @@ export function liveQueryCollectionOptions< | |||
const collections = extractCollectionsFromQuery(query) | |||
|
|||
const allCollectionsReady = () => { | |||
return Object.values(collections).every( | |||
(collection) => collection.status === `ready` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collection's have a method that checks exactly this: collection.isReady()
. Better to use that one.
replaces #384, fixes #383, fixes #370